package com.biz.user.mq;

import lombok.extern.slf4j.*;
import org.apache.rocketmq.spring.annotation.*;
import org.apache.rocketmq.spring.core.*;
import org.springframework.stereotype.*;

/**
 * @Description mq消费端
 *
 * @Author liuxi
 * @Date 2024/6/30
 **/
@Component
@RocketMQMessageListener(topic = "first-topic", consumerGroup = "test-group")
@Slf4j
public class TestRocketMQConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        log.info("接收到了mq:{}", s);
    }
}
